package com.turtle.service.impl;

import com.turtle.entity.sql.LoginRecord;
import com.turtle.mapper.LoginRecordMapper;
import com.turtle.service.LoginRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author lijiayu
 * @date 2020/7/18
 * @description 登录日志service
 */
@Service
public class LoginRecordServiceImpl implements LoginRecordService {

    @Autowired
    private LoginRecordMapper loginRecordMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int save(LoginRecord loginRecord) {
        return loginRecordMapper.insert(loginRecord);
    }
}
